import { request } from "@/utils/request.js";

export const studentInfo = (params) => {
  return request({
    url: '/student/page',
    method: 'get',
    params: params
  })
}

export const studentChange = (data) => {
  return request({
    url: '/student',
    method: 'put',
    data: data
  })
}

export const studentDelete = (id) => {
  return request({
    url: `/student/${id}`,
    method: 'delete',
  })
}

export const studentTreeNodes = () => {
  return request({
    url: '/student/tree-nodes',
    method: 'get',
  })
}

export const studentSearch = (a) => {
  return request({
    url: '/student/search',
    method: 'post',
    data: a
  })
}

export const studentAdd = (studentData) => {
  return request({
    url: '/student',
    method: 'post',
    data: studentData
  })
}
